import player.Player;
import servicePlayer.ServicePlayer;

import java.util.Iterator;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Станислав
 * Date: 28.06.14
 * Time: 12:31
 * To change this template use File | Settings | File Templates.
 */
public class Main {
    public static void main(String [] args){
        ServicePlayer s = new ServicePlayer();

        System.out.println("Проверим добавление новых игроков:");
        System.out.println(s.addPlayer(new Player("Stas","PSI",100)));
        System.out.println(s.addPlayer(new Player("Sasha","Shnur",120)));
        System.out.println(s.addPlayer(new Player("Olya","Nyashka",90)));
        System.out.println("============================================");
        System.out.println("Посмотрим ,что с таблицой:");
        List<Player> players = s.getAllPlayer();
        Iterator<Player> iter = players.iterator();
        while (iter.hasNext()){
            System.out.println(iter.next().toString());
        }
    }
}
